package com.example.opentransaction.controller;

import com.example.opentransaction.service.Change1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test1")
public class Test1Controller {
    @Autowired
    private Change1Service change1Service;

    @PostMapping("/test1")
    public int test1(Integer userId,Long money){
        return change1Service.updateMoney(userId,money);
    }
    @PostMapping("/change1")
    public String change1(Integer userIdOut,Integer userIdIn,Long money){
        return change1Service.change1(userIdOut,userIdIn,money);
    }
}
